<script setup lang="ts">
import { ref } from 'vue'
import ChildComp from './components/ChildComp.vue'
const isShow = ref(true)
</script>

<template>
  <div>
    父组件
    <!-- 使用子组件 -->
    <ChildComp v-if="isShow" />
    <button @click="isShow = false">干掉子组件</button>
  </div>
</template>
